package com.dailyblue.java.spring.ioc.mybatis.mapper;

import com.dailyblue.java.spring.ioc.mybatis.bean.Emp;
import org.apache.ibatis.annotations.*;

import java.util.List;
// 产生EmpMapper接口的代理对象
@Mapper
public interface EmpMapper {
    @Select("select * from emp where empstate=1")
    List<Emp> findAllEmp();
    @Update("update emp set ename=#{ename} where empno=#{id}")
    void update(@Param("ename") String ename,@Param("id") int id);
    @Delete("update emp set empstate=0 where empno=#{id}")
    void delete(int id);
}
